
#ifndef _MEMBER_BTHREAD_H_
#define _MEMBER_BTHREAD_H_

#include <BThread>

#ifdef _LINUX_
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#endif

#ifdef _WINDOWS_SYSTEM_
#include <Windows.h>
#endif

#define thread_member(thread)		((member_BThread*)((BThread*)thread)->_ptr)

namespace BWE
{
	class member_BThread
	{
	public:
		member_BThread(BThread* thread);
		~member_BThread();

		BThread*	boss;
		bool		done;
		bool		sleeping;
		int			exitcode;
		
#ifdef _LINUX_
		int			threadID;
		pthread_t	thread;
#endif
		
#ifdef _WINDOWS_SYSTEM_
		DWORD		ID;
		HANDLE		handle;
		HANDLE		htimer;
#endif
	};
}
#endif

